package iunaldev.iunal;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.os.Handler;

public class SplashScreenActivity extends Activity {

	private static final int SPLASH_DURATION = 2000;
	private Boolean backButtonPressed = false;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		
		
		super.onCreate(savedInstanceState);
		setContentView(R.layout.splash_screen_activity);
		
		Handler manejador = new Handler();
		manejador.postDelayed(new Runnable(){
			@Override
			public void run(){
				finish();
				if (!backButtonPressed){
					Intent intent = new Intent(SplashScreenActivity.this,MainActivityUn.class);
					startActivity(intent);
				}
			}
		}, SPLASH_DURATION);
	}
	
	@Override
	public void onBackPressed(){
		backButtonPressed=true;
	}


}